package com.rohan.apps.mileagetracker.shared.service;


import java.util.List;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.Service;
import com.rohan.apps.mileagetracker.server.db.locators.DaoServiceLocator;
import com.rohan.apps.mileagetracker.server.db.service.ReadingsDao;
import com.rohan.apps.mileagetracker.shared.proxies.ReadingProxy;
import com.rohan.apps.mileagetracker.shared.proxies.VehicleProxy;

@Service(value = ReadingsDao.class, locator = DaoServiceLocator.class)
public interface ReadingsRequestContext extends RequestContext {
	/*
	 * (non-Javadoc)
	 * @see com.rohan.apps.mileagetracker.server.db.dao.ObjectifyDao#listAllForUser()
	 * gets a list of all readings for the user
	 */
	public Request<List<ReadingProxy>> listAllReadingsForUser();
	/*
	 * Lists all readings for the user by vehicle
	 */	
	public Request<List<ReadingProxy>> listAllReadingsForUserByVehicle(VehicleProxy vehicle);
	public Request<Void> saveReadingForUser(ReadingProxy reading);
	public Request<Void> deleteReadingForUser(ReadingProxy reading);
}
